﻿@using GrainManage.Web.Resources
@model GrainManage.Entities.Price.OutputSearchPrice
@{
    if (Model.Prices != null)
    {
    <table data-total="@Model.Total">
        <tr>
            <th>@PriceResx.PriceID</th>
            <th>@PriceResx.Grain</th>
            <th>@PriceResx.PriceType</th>
            <th>@PriceResx.UnitPrice</th>
            <th>@PriceResx.Remarks</th>
            <th>@PriceResx.Created</th>
            <th>@GlobalResx.MoreAction</th>
        </tr>
        @foreach (var price in Model.Prices)
        {
            <tr>
                <td>@price.PriceID.ToString()</td>
                <td>@price.Grain</td>
                <td>@price.PriceType</td>
                <td>@price.UnitPrice</td>
                <td>@price.Remarks</td>
                @{
            string date = price.Created.HasValue ? price.Created.Value.ToString(GlobalResx.DateTimeFormat) : string.Empty;
                }
                <td>@date</td>
                <td><a href="/Price/EditPrice?priceID=@price.PriceID" data-value="@price.PriceID">@GlobalResx.Edit</a></td>
                @*      <td>
                    <input type="checkbox" value="@price.PriceID"/>
                </td>*@
            </tr>
        }
    </table>
    }
    else
    {
    @Html.Partial(GrainManage.Web.Constant.RestStatusView, Model);
    }
}
